package com.julius.design.chain;

/**
 * 处理者客户端
 */
public class ChainClient {


    private static RealHandlerOne realHandlerOne;

    private static RealHandlerTwo realHandlerTwo;

    static {
        realHandlerOne = new RealHandlerOne();
        realHandlerTwo = new RealHandlerTwo();
        //组装责任链
        realHandlerOne.setNext(realHandlerTwo);
    }

    public static void main(String[] args) {
        String request = "1";
        realHandlerOne.handleRequest(request);
    }
}
